package com.zst.amqp.utils;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * 时间相关工具类
 * @author zst
 */
public class DateUtils {
    public static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";

    /**
     * 返回yyyy-MM-dd HH:mm:ss格式的当前时间字符串
     * @return
     */
    public static String now() {
        return LocalDateTime.now().format(DateTimeFormatter.ofPattern(DATETIME_FORMAT));
    }
}
